﻿namespace Sidvall.LogManager.Data.Entity.Entities
{
    public partial class LogScopeItemCategory : global::Sidvall.Data.DataRowBase, global::Sidvall.LogManager.Data.ILogScopeItemCategory
    {
        #region Public Members

        #region Category

        private string _Category;
        public string Category
        { 
            get
            {
                return _Category;
            }
            set
            {
                _Category = value;
            }
        }

        #endregion
        #region LogScopeItemId

        private long _LogScopeItemId;
        public long LogScopeItemId
        { 
            get
            {
                return _LogScopeItemId;
            }
            set
            {
                _LogScopeItemId = value;
            }
        }

        #endregion
        
        public virtual Sidvall.LogManager.Data.Entity.Entities.LogScopeItem LogScopeItem { get; set; }
        
        #region DataRowContextStorageKey

        protected override string DataRowContextStorageKey
        {
            get
            {
                return global::Sidvall.LogManager.Data.Entity.SystemContext.Current.EntityFacade.LogScopeItemCategoryManager.GetKey(this);
            }
        }

        #endregion
        #region DataRowStateIsDirty

        protected override bool DataRowStateIsDirty
        {
            get
            {
                return global::Sidvall.LogManager.Data.Entity.SystemContext.Current.EntityFacade.LogScopeItemCategoryManager.DataRowStateIsDirty(this);
            }
        }

        #endregion

        #region ILogScopeItemCategory Members

        string global::Sidvall.LogManager.Data.ILogScopeItemCategory.Category
        {
            get
            {
                return this._Category;
            }
            set
            {
                this.Category = value;
            }
        }
        long global::Sidvall.LogManager.Data.ILogScopeItemCategory.LogScopeItemId
        {
            get
            {
                return this._LogScopeItemId;
            }
            set
            {
                this.LogScopeItemId = value;
            }
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        ILogScopeItem global::Sidvall.LogManager.Data.ILogScopeItemCategory.LogScopeItem
        {
            get
            {
                return this.LogScopeItem;
            }
            set
            {
                this.LogScopeItem = value as LogScopeItem;
            }
        }

        #endregion

        #endregion
        #region Constructors

        public LogScopeItemCategory() : this(false, null, null)
        {
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public LogScopeItemCategory(bool initializeChildren, Sidvall.Data.IDataRowContextProvider context, Sidvall.Data.DataRowState? dataRowState)
        {
            if ((context != null) || (dataRowState != null))
                SetDataRowContext(context, dataRowState);
            if (initializeChildren)
            {
            }
        }

        #endregion
    }
}